﻿#region

using FluentNHibernate.Mapping;

#endregion

namespace MediaSage.Lib.Database
{
    public class PluginMap : ClassMap<PluginEntity>
    {
        #region Constructors

        public PluginMap()
        {
            Table("Providers");
            Id(x => x.ID).GeneratedBy.Assigned();
            Map(x => x.Location);
            Map(x => x.MajorVersion);
            Map(x => x.MinorVersion);
            Map(x => x.Name);
            Map(x => x.Priority);
            HasMany(x => x.ConfigurationItems).Cascade.AllDeleteOrphan();
            Map(x => x.IsActive);
            Map(x => x.PluginType);
            Map(x => x.UpdateAutomatically);
            Map(x => x.UpdateURL);
            HasMany(x => x.ExtensionsHandled).Cascade.All();
            Map(x => x.IDObjectType);
        }

        #endregion Constructors
    }
}